package com.chuanyekeji.aokai.Mapper;

import com.chuanyekeji.aokai.Entity.Product;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface ProductMapper {
    int deleteByPrimaryKey(Integer id);

    int insert(Product record);

    int insertSelective(Product record);

    Product selectByPrimaryKey(Integer id);
    Product selectNextId(int id);
    Product selectLastId(int id);
    List<Product> getProductList(@Param("indexRow") int indexRow, @Param("lastRow")int lastRow);
    List<Product> getProductListByType(@Param("productTypeId") int productTypeId,@Param("indexRow") int indexRow, @Param("lastRow")int lastRow);
    List<Product> getProductByNameList(@Param("indexRow") int indexRow, @Param("lastRow")int lastRow,@Param("productName")String productName);
    int getProductCountByName(String productName);
    List<Product> getProductCount();
    int getProductByTypeCount(int productTypeId);
    int updateByPrimaryKeySelective(Product record);
    List<Product> searchIndex(String index);
    int searchIndexCount(String index);
    int updateByPrimaryKey(Product record);
}